package com.zzh.service;

import cn.hutool.json.JSON;
import com.zzh.model.OrderBase;
import com.zzh.utils.JsonUtils;
import com.zzh.utils.RabbitSendMessageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * @ClassName OrderService
 * @date 2021/4/25 16:29
 * @Version 1.0
 * @Description //模拟事务
 * @USER root
 */
@Service
public class OrderService {

    @Autowired
    RabbitSendMessageUtils rabbitSendMessageUtils;


    public void createOrder(OrderBase order)  {
        Boolean sendMessage = rabbitSendMessageUtils.sendMessage("order", JsonUtils.obj2json(order));
        if (sendMessage) {

        }
    }
}
